#! /bin/bash

. $LSB_DIR/tool-functions || \
	{ echo "invalid lsb dir: $LSB_DIR" >&2; exit 1; }

. $INITRAMFS_DIR_DATA/functions || error_exit "import functions fail"

set_level "${INITRAMFS_PRINT_LEVEL:-INFO}"
[ -n "$INITRAMFS_LOG" ] && set_log "$INITRAMFS_LOG"

msg collect busybox

bb=$INITRAMFS_DIR_BUSYBOX

verbose "cp busybox data"
[ -d "$bb" ] || error_exit "invalid busybox directory $bb"
cp -a $bb/* $INITRAMFS_DIR_DEST
add_elf_library "$bb/bin/busybox"

exit 0
